@import '../../../../css/mobile/components/normalize';
@import '../../../../css/mobile/components/font';

body {
  padding-bottom: 100px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.banner {
  height: 422px;
  background: url(../../../../mobile/campaign/phonics/img/banner.png);
  background-size: 100% 422px;
  position: relative;

  .play-icon {
    width: 110px;
    height: 110px;
    background: #FFD704 url('../../../../mobile/campaign/insect/icon/ic_play.png');
    background-size: 110px 110px;
    position: absolute;
    top: 180px;
    left: 325px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    transition: transform 0.7s linear 0s;
    box-shadow: 5px 0px 6px 6px rgba(255, 215, 4, 0.1),-5px 0px 6px 6px rgba(255, 215, 4, 0.1),0px 5px 6px 6px rgba(255, 215, 4, 0.1),0px -5px 6px 6px rgba(255, 215, 4, 0.1);
  }
}

.main {
  .content {
    margin: 0 40px 0 40px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(231, 232, 234, 1);

    .price {
      height: 48px;
      line-height: 48px;
      color: #999EA8;
      font-size: 28px;
      color: rgba(153, 158, 168, 1);

      .current-price {
        font-size: 48px;
        color: #FF5B34;
        &:before {
          content: '¥' !important;
          font-size: 32px;
        }
      }
      .original-price {
        margin-left: 16px;
        text-decoration: line-through;
        &:before {
          content: '¥' !important;
          font-size: 28px;
        }
      }
    }

    .title {
      height: 44px;
      line-height: 44px;
      margin-top: 14px;
      font-size: 32px;
      font-family: PingFangSC-Regular;
      color: rgba(103, 108, 117, 1);
    }
  }

  .progress {
    margin: 0 40px 32px 40px;
    padding-top: 28px;

    .title {
      height: 50px;
      font-size: 36px;
      font-family: PingFangSC-Medium;
      color: rgba(40, 43, 49, 1);
      line-height: 50px;
    }

    .list {
      margin-top: 32px;
      display: flex;
      flex-direction: row;
      justify-content: space-between;

      @for $i from 1 through 4 {
        .lesson-#{$i} {
          background-image: url(../../../../mobile/campaign/phonics/img/course_#{$i}.png);
        }
        .level-#{$i} {
          background-image: url(../../../../mobile/campaign/phonics/img/level_#{$i}.png);
        }
      }

      .item {
        display: flex;
        align-items: flex-end;
        justify-content: center;
        width: 128px;
        height: 168px;
        padding-bottom: 6px;
        background-size: 128px 128px;
        background-repeat: no-repeat;
        border-radius: 8px;
        overflow: hidden;
        box-sizing: border-box;
        font-size: 24px;
        color: rgba(103, 108, 117, 1);
        box-shadow: 1px 1px rgba(231, 232, 234, 1) inset,
        -1px -1px rgba(231, 232, 234, 1) inset,
        -1px 1px rgba(231, 232, 234, 1) inset,
        1px -1px rgba(231, 232, 234, 1) inset;
      }

      .lock {
        position: relative;

        &:before {
          position: absolute;
          top: 0;
          left: 0;
          content: '' !important;
          width: 128px;
          height: 128px;
          background-color: rgba(0, 0, 0, 0.5);
        }
        &:after {
          position: absolute;
          top: 0;
          right: 0;
          content: '' !important;
          width: 40px;
          height: 40px;
          background: #32CDFF url(../../../../mobile/campaign/phonics/icon/ic_lock.png) no-repeat 10px 10px;
          background-size: 20px 20px;
          border-radius: 0 8px 0 8px;
        }
      }
    }
  }

  .notice {
    text-align: center;
    height: 40px;
    font-size: 28px;
    font-family: PingFangSC-Regular;
    color: rgba(153, 158, 168, 1);
    line-height: 40px;
    display: block;
    opacity: 0;

    .day-1, .day-2, .hour-1, .hour-2, .min-1, .min-2 {
      display: inline-block;
      width: 24px;
      height: 30px;
      line-height: 30px;
      margin: 0 2px;
      padding: 0 2px;
      color: rgba(255, 255, 255, 1);
      background: rgba(185, 189, 195, 1);
    }
  }
}

.instruction {
  margin-top: 80px;

  .title {
    text-align: center;
    height: 44px;
    background: url(../../../../mobile/campaign/spell/img/title.png) no-repeat 287.5px -6px;
    background-size: 165px 44px;
  }
  .text {
    list-style-type: decimal;
    font-size: 28px;
    color: rgba(103, 108, 117, 1);
    line-height: 56px;
    padding-right: 20px;
  }
}

.background {
  line-height: 0;

  img {
    width: 100%;
    user-select: none;
  }

  .level {
    height: 1204px;
    background: url(../../../../mobile/campaign/phonics/img/bg-3.jpg);
    background-size: 100% 100%;
    position: relative;

    .level-buttons {
      position: absolute;
      top: 296px;
      left: 40px;
      width: 670px;
      height: 76px;
      border-radius: 200px;
      border: 2px solid rgba(255, 255, 255, 1);
      z-index: 2;
      box-sizing: border-box;

      div {
        display: inline-block;
        width: 333px;
        height: 76px;
        line-height: 76px;
        text-align: center;
        color: #FFFFFF;
        box-sizing: border-box;
        transition: color 0s linear 0.15s;
      }

      .level-2 {
        margin-left: -16px;
        padding-left: 20px;
      }
    }
    .level-select {
      position: absolute;
      top: 296px;
      left: 40px;
      width: 334px;
      height: 76px;
      background: #FFFFFF;
      border-radius: 200px;
      z-index: 1;
      box-sizing: border-box;
      transition: transform 0.3s linear 0s;
    }
    .level-content {
      position: absolute;
      top: 404px;
      left: 20px;
      width: 710px;
      height: 716px;

      img {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 0s linear 0.15s;
      }
    }

    &.level-1 {
      .level-buttons {
        .level-1 {
          color: #FF9A3A;
        }
      }
      .level-select {
        transform: translate(0, 0);
      }
      .level-content {
        .level-1 {
          opacity: 1;
        }
      }
    }
    &.level-2 {
      .level-buttons {
        .level-2 {
          color: #FF9A3A;
        }
      }
      .level-select {
        transform: translate(334px, 0);
      }
      .level-content {
        .level-2 {
          opacity: 1;
        }
      }
    }
  }

  .qrcode {
    position: relative;

    #account-info {
      display: none;
      width: 100%;
      height: 100px;
      position: absolute;
      top: 780px;
      text-align: center;
      color: #676C75;
      font-size: 28px;
    }
  }
}

.buy {
  position: fixed;
  bottom: 0;
  z-index: 3;
  width: 100%;
  height: 100px;
  line-height: 100px;
  background: rgba(255, 91, 52, 1);
  text-align: center;
  font-size: 32px;
  font-family: PingFangSC-Medium;
  color: rgba(255, 255, 255, 1);
}

.share-mask {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1005;
  overflow: hidden;
  display: none;

  .share-arrow {
    background: url('../../../../icon/mobile/campaign/christmas/share_arrow.png');
    background-size: 200px 200px;
    width: 200px;
    height: 200px;
    position: absolute;
    top: 20px;
    right: 20px;
  }
}

.video-mask {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1005;
  overflow: hidden;
  display: none;

  .close-icon {
    background: url('../../../../icon/mobile/campaign/christmas/close.svg') no-repeat;
    background-size: 96px 96px;
    width: 96px;
    height: 96px;
    display: block;

    &.icon {
      cursor: pointer;
      z-index: 1005;
      position: absolute;
      overflow: hidden;
      top: 15%;
      left: 50%;
      margin-left: -48px;
    }
  }

  .video {
    margin-top: 20%;
    .vcp-player {
      margin: 0 auto;
    }
  }
}

.alert-box {
  position: fixed;
  top: calc(50vh - 50px);
  left: calc(50% - 200px);
  color: white;
  width: 340px;
  padding: 30px;
  line-height: 40px;
  background-color: rgba(0,0,0,0.5);
  border-radius: 10px;
  font-size: 28px;
  text-align: center;
  display: none;
  z-index: 1009;
}

// iPhone X 屏幕尺寸适配
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
  // 安全高度语法支持适配
  @supports (bottom:constant(safe-area-inset-bottom)) or (bottom:env(safe-area-inset-bottom)) {
    body {
      padding-bottom: calc(100px + constant(safe-area-inset-bottom)) !important;
      padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
    }
    .buy {
      height: calc(100px + constant(safe-area-inset-bottom)) !important;
      height: calc(100px + env(safe-area-inset-bottom)) !important;
    }
  }
}
